package com.gtq.uhome.controller;

import com.gtq.uhome.result.Result;
import com.gtq.uhome.service.DeliveryDetailsService;
import com.gtq.uhome.vo.DeliveryDetailsVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping(value = "/findDeliveryDetails")
@CrossOrigin
@Api(tags = "站点后台——派送详情——审核成功/失败——何凡")
public class FindDeliveryDetails {

    @Resource
    DeliveryDetailsService deliveryDetailsService;

    /**
     * 派送详情，审核成功/失败
     * @param deliveryDetailsVo
     * @return
     */
    @PostMapping
    @ResponseBody
    @ApiOperation(value = "派送详情，审核成功/失败")
    public Result<List<DeliveryDetailsVo>> findDeliveryDetails(@RequestBody DeliveryDetailsVo deliveryDetailsVo){
        List<DeliveryDetailsVo> deliveryDetails = deliveryDetailsService.findDeliveryDetails(deliveryDetailsVo);
        return Result.ok(deliveryDetails);
    }
}
